/**
  ******************************************************************************
  * @file    WORKFLOW_CFG.h
  * @author  Feirui_Joe
  * @version V0.1
  * @date    07/26/2010
  * @brief   Outputs Driver
  ******************************************************************************
  * @copy
  *
  * <h2><center>&copy; COPYRIGHT 2010 Feirui</center></h2>
  */ 



/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef  __WORKFLOW_CFG_H__
#define  __WORKFLOW_CFG_H__


#ifdef __cplusplus
 extern "C" {
#endif


/**
  * @brief  INCLUDE FILES.
  */


/**
  * @brief GLOBALS RAM definition
  */
#ifdef   WORKFLOW_CFG_GLOBALS
#define  WORKFLOW_CFG_EXT
#else
#define  WORKFLOW_CFG_EXT  extern
#endif


#define OutControlModeOrd_InStopMode                    (RelayOutputType_InStopMode      -RelayOutputType_InStopMode)
#define OutControlModeOrd_InManualMode                  (RelayOutputType_InManualMode    -RelayOutputType_InStopMode)
#define OutControlModeOrd_InManualTestMode              (RelayOutputType_InManualTestMode-RelayOutputType_InStopMode)
#define OutControlModeOrd_InAutoMode                    (RelayOutputType_InAutoMode      -RelayOutputType_InStopMode)
#define OutControlModeTOT_Num                           (OutControlModeOrd_InAutoMode+1)

#define UserOutCfgBFOrd_OutputDelay                     (Adr_UserCfgTime1OutputDelay-Adr_UserCfgTime1OutputDelay)
#define UserOutCfgBFOrd_OutputTime                      (Adr_UserCfgTime1OutputTime -Adr_UserCfgTime1OutputDelay)
#define UserOutCfgBFOrd_VailTime                        (Adr_UserCfgTime1VailTime   -Adr_UserCfgTime1OutputDelay)
#define UserOutCfgBFOrd_Type                            (Adr_UserCfgTime1Type       -Adr_UserCfgTime1OutputDelay)
#define UserOutCfgBFOrd_Active                          (Adr_UserCfgTime1Active     -Adr_UserCfgTime1OutputDelay)
#define UserOutCfgBFNum_Single                          (UserOutCfgBFOrd_Active+1)

#define UserOutCfgBFOrd_S1Type                          (Adr_UserCombineOutput1S1Type  -Adr_UserCombineOutput1S1Type)
#define UserOutCfgBFOrd_S1Active                        (Adr_UserCombineOutput1S1Active-Adr_UserCombineOutput1S1Type)
#define UserOutCfgBFOrd_S2Type                          (Adr_UserCombineOutput1S2Type  -Adr_UserCombineOutput1S1Type)
#define UserOutCfgBFOrd_S2Active                        (Adr_UserCombineOutput1S2Active-Adr_UserCombineOutput1S1Type)
#define UserOutCfgBFOrd_S3Type                          (Adr_UserCombineOutput1S3Type  -Adr_UserCombineOutput1S1Type)
#define UserOutCfgBFOrd_S3Active                        (Adr_UserCombineOutput1S3Active-Adr_UserCombineOutput1S1Type)
#define UserOutCfgBFNum_Group                           (UserOutCfgBFOrd_S3Active+1)

#define UserDefineOrd_Out1                              0
#define UserDefineOrd_Out2                              1
#define UserDefineOrd_Out3                              2
#define UserDefineOrd_Out4                              3
#define UserDefineOrd_Out5                              4
#define UserDefineOrd_Out6                              5

#define DGTInputTrigPeriodMin     0
#define DGTInputTrigPeriodMax     1
#define DGTInputTrigPeriodNum     2
#define DGTInputTrigTrigerNum     PcfgActivePeriod_TOTNum
WORKFLOW_CFG_EXT const uint8_t DigitalInputTrigerPeriodTable[DGTInputTrigTrigerNum][DGTInputTrigPeriodNum];

#define DGTInputTouchAdrNum       PcfgAlarmOpt_TOTNum
WORKFLOW_CFG_EXT const uint8_t DigitalInputTouchStaAdrTable[DGTInputTouchAdrNum];
 
WORKFLOW_CFG_EXT const uint8_t WFAlarmCfgSensorSwitchTable[PcfgSensorType_TOTNum][WorkflowMode_TOTNum][RawAlarmByteNumCfgSensorx];
WORKFLOW_CFG_EXT const uint8_t WFAlarmFixSourceSwitchTable[WorkflowPeriod_TblNum][WorkflowMode_TOTNum][RawAlarmByteNumFixSource];

WORKFLOW_CFG_EXT const uint8_t OutAlarmWarnSwitchTable    [OutAlarm_TOTByteNum];
WORKFLOW_CFG_EXT const uint8_t OutAlarmShutDownSwitchTable[OutAlarm_TOTByteNum];
WORKFLOW_CFG_EXT const uint8_t OutAlarmELETripSwitchTable [OutAlarm_TOTByteNum];
WORKFLOW_CFG_EXT const uint8_t OutAlarmTripSwitchTable    [OutAlarm_TOTByteNum];
WORKFLOW_CFG_EXT const uint8_t OutAlarmIndicateSwitchTable[OutAlarm_TOTByteNum];

WORKFLOW_CFG_EXT const uint8_t InhibitAlarmWarnSwitchTable    [OutAlarm_TOTByteNum];
WORKFLOW_CFG_EXT const uint8_t InhibitAlarmShutDownSwitchTable[OutAlarm_TOTByteNum];
WORKFLOW_CFG_EXT const uint8_t InhibitAlarmELETripSwitchTable [OutAlarm_TOTByteNum];
WORKFLOW_CFG_EXT const uint8_t InhibitAlarmTripSwitchTable    [OutAlarm_TOTByteNum];
WORKFLOW_CFG_EXT const uint8_t InhibitAlarmIndicateSwitchTable[OutAlarm_TOTByteNum];

WORKFLOW_CFG_EXT const uint8_t AlarmMarkRecordSwitchTable  [AlarmMarksCombinFlagByteNum];
WORKFLOW_CFG_EXT const uint8_t MemoryAlarmEventSwitchTable [AlarmMarksCombinFlagByteNum];
WORKFLOW_CFG_EXT const uint8_t AlarmMarkShutDownSwitchTable[AlarmMarksCombinFlagByteNum];
WORKFLOW_CFG_EXT const uint8_t AlarmMarkWarnSwitchTable    [AlarmMarksCombinFlagByteNum];
WORKFLOW_CFG_EXT const uint8_t AlarmMarkELETripSwitchTable [AlarmMarksCombinFlagByteNum];
WORKFLOW_CFG_EXT const uint8_t AlarmMarkTripSwitchTable    [AlarmMarksCombinFlagByteNum];
WORKFLOW_CFG_EXT const uint8_t AlarmMarkIndicateSwitchTable[AlarmMarksCombinFlagByteNum];

#ifdef __cplusplus
}
#endif


#endif   /*  __WORKFLOW_CFG_H__  */

/******************* (C) COPYRIGHT 2010 Feirui *****END OF FILE****/